widget: Redo drawing code
authorBenjamin Otte <otte@redhat.com>
Tue, 19 Jan 2016 01:42:58 +0000 (02:42 +0100)
committerBenjamin Otte <otte@redhat.com>
Tue, 19 Jan 2016 02:45:27 +0000 (03:45 +0100)
commit580ea227a6bb19ad6c6d4766b3a36dbad24583f3
tree7519d4102b1f94cf404948cc7a6f8fce76de7daa
parent402cecf9a2aecf95ac8efca84179adcb1ce8e956
widget: Redo drawing code

Previously, we had a special cae to draw subwindows of widgets.

This is not necessary as conformant widgets should be able to properly
render themselves when all windows need to be painted.
From now on assume that is the case.

We therefore paint nonnative GDK windows "inline" by just returning TRUE
for gtk_cairo_should_draw_window() for those windows.

This speeds up hilighting different rows in the listbox gtk-demo example
tremendously (by a factor of 10 or more) as the previous code was
O(<number of non-window subwidgets> *
<number of subwindows>) which in the listbox example were ~15,000 and
~2,000 respectively.
gtk/gtkcontainer.c
gtk/gtkwidget.c
gtk/gtkwidgetprivate.h